package com.hsd.znsh.repository;

import com.hsd.znsh.entity.Farm;
import com.hsd.znsh.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Date;
import java.util.List;

/*
 * @auther: wangjiacai
 *
 * @create: 2018-04-23 11:54:50
 */
public interface FarmRepository extends JpaRepository<Farm,Integer> {

    List<Farm> findByFarmTypeIdAndCreateDateTimeAfter(Integer farmTypeId,Date date);

    List<Farm> findByBatchIdOrderByCreateDateTimeDesc(Integer batchId);

    List<Farm> findByBatchIdAndFarmTypeIdOrderByCreateDateTimeDesc(Integer batchId,Integer farmTypeId);
}
